package org.os.framework.context.model;

import org.springframework.lang.NonNull;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * http异常
 * @author weizuxiao
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class HttpException extends RuntimeException {

    /**
     * 状态码
     */
    @NonNull
    private String status;

    /**
     * 消息描述
     */
    private String message;

    /**
     * 数据
     */
    private Object data;

    public HttpException(String status) {
        super();
        this.status = status;
        this.message = null;
        this.data = null;
    }
 
    public HttpException(String status, String message) {
        super(message);
        this.status = status;
        this.message = message;
        this.data = null;
    }

    public HttpException(String status, String message, Object data) {
        super(message);
        this.status = status;
        this.message = message;
        this.data = data;
    }
    
}
